<%--
  Created by IntelliJ IDEA.
  User: 黄彪
  Date: 2018/12/23 0023
  Time: 11:44
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page import="java.util.Date" %>
<%
    request.setCharacterEncoding("utf-8");
%>
<html>
<head>
    <title>课后习题2</title>
</head>
<body>

<%
    Date date=new Date();
    String time=String.format("%ta",date);
    request.setAttribute("days",time);
%>
<c:choose>
    <c:when test="${requestScope.days eq '星期日'}">
        <c:out value="今天是${requestScope.days}"></c:out>
    </c:when>
    <c:when test="${requestScope.days eq '星期一'}">
        <c:out value="今天是${requestScope.days}"></c:out>
    </c:when>
    <c:when test="${requestScope.days eq '星期二'}">
        <c:out value="今天是${requestScope.days}"></c:out>
    </c:when>
    <c:when test="${requestScope.days eq '星期三'}">
        <c:out value="今天是${requestScope.days}"></c:out>
    </c:when>
    <c:when test="${requestScope.days eq '星期四'}">
        <c:out value="今天是${requestScope.days}"></c:out>
    </c:when>
    <c:when test="${requestScope.days eq '星期五'}">
        <c:out value="今天是${requestScope.days}"></c:out>
    </c:when>
    <c:when test="${requestScope.days eq '星期六'}">
        <c:out value="今天是${requestScope.days}"></c:out>
    </c:when>
</c:choose>

</body>
</html>
